<?php
	////$this->Html->script('cache.js', false);

	//fejléc
	print '<tr id="tetelsor" class="'.$iranyCss.'">';
	print '<th class="tamount">'. __('Amount').'</th>';
	print '<th class="ttext">'.__('Text').'</th>';
	print '<th class="taccount">'.__('Account').'</th>';
	print '<th class="ttags">'.__('Tags').'</th>';
	if($modosithat) print '<th class="felkuld">'.$this->Html->image('addSor.png', array('title' => 'Új tételsor')).'</th>';
	print '</tr>';
	//tételek bevitelére szolgáló form mezők
	print '<tr '.$options.'>';
	print '<td class="tamount">'.$this->Form->input('Tetel.osszeg',
									  array('name' => 'data[Tetel][osszeg]',
											  'label' => false,
											  'size' => 15,
                                              'type' => 'text',
											  'required' => false,
											  'class' => 'jobb')).'</td>';
	print '<td class="ttext">'.$this->Form->input('Tetel.szoveg',
									  array('name' => 'data[Tetel][szoveg]',
											  'label' => false,
											  'autocomplete' => 'on',
											  'required' => false,
											  'size' => 22)).'</td>';
	print '<td class="taccount">';

		print '<div class="account">';
		print $this->CachedAutoComplete->create(
				'Tetel.account',
				'/szamlak/search/' . $naploId,
				array(
					'cacheId' => $this->Session->read('Settings.cegId') . '-' . $this->Session->read('Settings.ev'),
					'autocompleterOptions' => '{afterUpdateElement : laksmi.bizonylat.bizonylat.setSzamlaId}'
					)
				);
		print '</div>';
/**/
	print '</td>';

	print '<td class="ttags">
		<div class="tags">'.
			$this->CachedAutoComplete->create(
				'Tetel.gyujto',
				'/gyujtok/search',
				array(
					'cacheId' => $this->Session->read('Settings.cegId') . '-' . $this->Session->read('Settings.ev'),
					'autocompleterOptions' => '{tokens : ",",
														afterUpdateElement : laksmi.bizonylat.bizonylat.setGyujtoId}'
					)).
			'<span id="selectedTags"></span>
			</div>
		</td>';
	if($modosithat) print '<td>'.$this->Form->submit('lekuld.png',
										array(
											'id' => 'le'
										)).'</td>';
	print '</tr>';
?>